with($.fn.calendar.defaults){
	weeks = ["日","一","二","三","四","五","六"];
	months = ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"];
}

$(document).ready(function(){
	$('.easyui-datebox').datebox({
    	formatter: function(date){ return date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate();},
    	parser: function(date){ return new Date(Date.parse(date.replace(/-/g,"/")));},
		currentText:"",
		closeText:"关闭",
		okText:"确认",
		editable:false
	});
	
	$('span.checkbox').click(function(){
		$(this).prev().click();
	});
	$('span.checkbox').css('cursor', 'pointer');
});

function addNewNode(obj){
	var newnode = obj.clone();
	newnode.removeAttr('id');
	obj.parent().append(newnode);
}
var sysdialog = $('<div></div>');
function showmsg(message){
	sysdialog.dialog({
		'width':300,
		'height':150,
		'title':'提示信息'
	});
	
	sysdialog.html(message);
}

function confirmmsg(message, confirmAction){	
	sysdialog.dialog({
		width:300,
		height:150,
		title:'提示信息',
		buttons:[
			{text:'确认',handler:confirmAction},
			{text:'取消',handler:function(){sysdialog.remove();}}
		]
	});
	
	sysdialog.html(message);
}